package com.mmall.common;


//枚举状态码
public enum ResponseCode {
	
	//成功
	SUCCESS(0,"SUCCESS"),
	//失败
    ERROR(1,"ERROR"),
    //需要登录
    NEED_LOGIN(10,"NEED_LOGIN"),
    //传递的参数错误
    ILLEGAL_ARGUMENT(2,"ILLEGAL_ARGUMENT");

    private final int code;//状态码
    private final String desc;//代表含义

    //构造方法，参数对应上面四种枚举类型
    ResponseCode(int code,String desc){
        this.code = code;
        this.desc = desc;
    }

    public int getCode(){
        return code;
    }
    public String getDesc(){
        return desc;
    }
}
